Produced by Araxis Merge on 2024-03-04 14:38:52 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | /Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme v4.0.7/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/ajaxproducts | grid.phtml | 2023-03-13 04:09:12 +0000 |
| 2 | /Users/coca/Documents/www/Porto v4.0.2/Theme Files/Magento 2.x/Porto Theme v4.0.8/app/design/frontend/Smartwave/porto/Smartwave_Porto/templates/ajaxproducts | grid.phtml | 2024-03-02 11:16:28 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 21 | 732 |
| Changed | 10 | 223 |
| Inserted | 9 | 84 |
| Removed | 1 | 1 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | 1 | <?php | |||
| 2 | /** | 2 | /** | |||
| 3 | * Copyright © 2015 Magento. All rights reserved. | 3 | * Copyright © 2015 Magento. All rights reserved. | |||
| 4 | * See COPYING.txt for license details. | 4 | * See COPYING.txt for license details. | |||
| 5 | */ | 5 | */ | |||
| 6 | use Magento\Framework\App\Action\Action; | 6 | use Magento\Framework\App\Action\Action; | |||
| 7 | 7 | |||||
| 8 | // @codingStandardsIgnoreFile | 8 | // @codingStandardsIgnoreFile | |||
| 9 | ?> | 9 | ?> | |||
| 10 | <?php | 10 | <?php | |||
| 11 | /** | 11 | /** | |||
| 12 | * Product list template | 12 | * Product list template | |||
| 13 | * | 13 | * | |||
| 14 | * @var $block \Smartwave\Filterproducts\Block\ | 14 | * @var $block \Smartwave\Filterproducts\Block\ | |||
| 15 | */ | 15 | */ | |||
| 16 | ?> | 16 | ?> | |||
| 17 | <?php | 17 | <?php | |||
| 18 | $_productCollection = $block->getLoadedProductCollection(); | 18 | $_productCollection = $block->getLoadedProductCollection(); | |||
| 19 | $_helper = $this->helper('Magento\Catalog\Helper\Output'); | 19 | $_helper = $this->helper('Magento\Catalog\Helper\Output'); | |||
| 20 | $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); | 20 | $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); | |||
| 21 | $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); | 21 | $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); | |||
| 22 | $_category_config = $_portohelper->getConfig('porto_settings/category'); | 22 | $_category_config = $_portohelper->getConfig('porto_settings/category'); | |||
| 23 | $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); | 23 | $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); | |||
| 24 | $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label'); | 24 | $_product_label_config = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/product_label'); | |||
| 25 | 25 | |||||
| 26 | $_content_pos1 = isset($_category_grid_config['product_content_pos1']) ? $_category_grid_config['product_content_pos1'] : 'left'; | |||||
| 27 | $_button_pos = isset($_category_grid_config['product_button_pos']) ? $_category_grid_config['product_button_pos'] : 'top'; | |||||
| 28 | $_button_action = isset($_category_grid_config['product_button_action']) ? $_category_grid_config['product_button_action'] : 'top'; | |||||
| 29 | $_icon_only1 = isset($_category_grid_config['product_icon_only1']) ? $_category_grid_config['product_icon_only1'] : '0'; | |||||
| 30 | $_icon_only2 = isset($_category_grid_config['product_icon_only2']) ? $_category_grid_config['product_icon_only2'] : '0'; | |||||
| 31 | $_block_pos = isset($_category_grid_config['product_block_pos']) ? $_category_grid_config['product_block_pos'] : 'default'; | |||||
| 32 | $_quantity_pos = isset($_category_grid_config['product_quantity_pos']) ? $_category_grid_config['product_quantity_pos'] : 'below'; | |||||
| 33 | $_content_pos2 = isset($_category_grid_config['product_content_pos2']) ? $_category_grid_config['product_content_pos2'] : 'default'; | |||||
| 34 | $_link_pos = isset($_category_grid_config['product_link_pos']) ? $_category_grid_config['product_link_pos'] : 'default'; | |||||
| 35 | $_box_style = isset($_category_grid_config['product_box_style']) ? $_category_grid_config['product_box_style'] : 'box_shadow'; | |||||
| 36 | ||||||
| 26 | $aspect_ratio = $this->getData("aspect_ratio"); | 37 | $aspect_ratio = $this->getData("aspect_ratio"); | |||
| 27 | if($aspect_ratio == null) { | 38 | if($aspect_ratio == null) { | |||
| 28 | $aspect_ratio = $_category_config['aspect_ratio']; | 39 | $aspect_ratio = $_category_config['aspect_ratio']; | |||
| 29 | } | 40 | } | |||
| 30 | $image_width = $this->getData("image_width"); | 41 | $image_width = $this->getData("image_width"); | |||
| 31 | if(!$image_width) { | 42 | if(!$image_width) { | |||
| 32 | $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; | 43 | $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; | |||
| 33 | } | 44 | } | |||
| 34 | $image_height = $this->getData("image_height"); | 45 | $image_height = $this->getData("image_height"); | |||
| 35 | if(!$image_height) { | 46 | if(!$image_height) { | |||
| 36 | $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; | 47 | $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; | |||
| 37 | } | 48 | } | |||
| 38 | $column_count = $this->getData("column_count"); | 49 | $column_count = $this->getData("column_count"); | |||
| 39 | if($column_count == null) { | 50 | if($column_count == null) { | |||
| 40 | $column_count = 4; | 51 | $column_count = 4; | |||
| 41 | } | 52 | } | |||
| 42 | $product_count = $this->getData("product_count"); | 53 | $product_count = $this->getData("product_count"); | |||
| 43 | $category_id = $this->getData("category_id"); | 54 | $category_id = $this->getData("category_id"); | |||
| 44 | $product_type = $_category_grid_config['product_type']; | 55 | $product_type = $_category_grid_config['product_type']; | |||
| 45 | if($product_type == null) { | 56 | if($product_type == null) { | |||
| 46 | $product_type = 1; | 57 | $product_type = 1; | |||
| 47 | } | 58 | } | |||
| 48 | ?> | 59 | ?> | |||
| 49 | <?php if (!$_productCollection->count()): ?> | 60 | <?php if (!$_productCollection->count()): ?> | |||
| 50 | <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> | 61 | <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> | |||
| 51 | <?php else: ?> | 62 | <?php else: ?> | |||
| 52 | <?php | 63 | <?php | |||
| 53 | $viewMode = 'grid'; | 64 | $viewMode = 'grid'; | |||
| 54 | $image = 'category_page_grid'; | 65 | $image = 'category_page_grid'; | |||
| 55 | $hover_image = 'category_page_grid-hover'; | 66 | $hover_image = 'category_page_grid-hover'; | |||
| 56 | $showDescription = false; | 67 | $showDescription = false; | |||
| 57 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; | 68 | $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; | |||
| 58 | ?> | 69 | ?> | |||
| 59 | <div class="products wrapper <?php echo $viewMode; ?> columns<?php echo $column_count; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>"> | 70 | <div class="products wrapper <?php echo $viewMode; ?> columns<?php echo $column_count; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>"> | |||
| 60 | <?php $iterator = 1; ?> | 71 | <?php $iterator = 1; ?> | |||
| 61 | <ol class="filterproducts products list items product-items"> | 72 | <ol class="filterproducts products list items product-items"> | |||
| 62 | <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> | 73 | <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> | |||
| 63 | <?php foreach ($_productCollection as $_product): ?> | 74 | <?php foreach ($_productCollection as $_product): ?> | |||
| 64 | <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?> | 75 | <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?> | |||
| 65 | <div class="product-item-info type<?php echo $product_type; ?> | 76 | <?php | |||
| 77 | $newType = array("13", "14", "15", "16", "17", "18", "19", "20"); | |||||
| 78 | $_type_class = ''; | |||||
| 79 | $_content_pos1 = ''; | |||||
| 80 | if(in_array($product_type, $newType)) { | |||||
| 81 | $_content_pos1 = ' text-'.$_content_pos1; | |||||
| 82 | $_type_class = ' product-type-advanced'; | |||||
| 83 | if($product_type == '15'){ | |||||
| 84 | $_type_class = ' product-type-advanced effect-ovdefault'; | |||||
| 85 | if($_button_action == 'top'){ | |||||
| 86 | $_content_pos1 = ' text-center'; | |||||
| 87 | } | |||||
| 88 | if($_button_action == 'hide'){ | |||||
| 89 | $_content_pos1 = ' text-center hide-actions'; | |||||
| 90 | } | |||||
| 91 | } | |||||
| 92 | if($product_type == '16'){ | |||||
| 93 | $_type_class = ' product-type-advanced effect-hddf'.' box-'.$_block_pos; | |||||
| 94 | } | |||||
| 95 | if($product_type == '18'){ | |||||
| 96 | $_type_class = ' product-type-advanced effect-detailimg'; | |||||
| 97 | $_content_pos1 = ' text-left'; | |||||
| 98 | if($_content_pos2 == 'top'){ | |||||
| 99 | $_type_class = ' product-type-advanced effect-detailimg actions-bottom'; | |||||
| 100 | } | |||||
| 101 | if($_content_pos2 == 'center'){ | |||||
| 102 | $_content_pos1 = ' text-center'; | |||||
| 103 | $_type_class = ' product-type-advanced effect-detailimg actions-center'; | |||||
| 104 | } | |||||
| 105 | if($_content_pos2 == 'bottom'){ | |||||
| 106 | $_type_class = ' product-type-advanced effect-detailimg actions-top'; | |||||
| 107 | } | |||||
| 108 | } | |||||
| 109 | if($product_type == '19'){ | |||||
| 110 | $_type_class = ' product-type-advanced effect-cartlink'; | |||||
| 111 | if($_link_pos == 'image') { | |||||
| 112 | $_type_class = ' product-type-advanced effect-cartlink cartlink-image'; | |||||
| 113 | } | |||||
| 114 | $_content_pos1 = ' text-left'; | |||||
| 115 | } | |||||
| 116 | if($product_type == '20'){ | |||||
| 117 | $_content_pos1 = ' text-center'; | |||||
| 118 | if($_box_style == 'box_shadow') { | |||||
| 119 | $_type_class .= ' product-type-advanced effect-bheshadow'; | |||||
| 120 | } | |||||
| 121 | if($_box_style == 'box_full') { | |||||
| 122 | $_type_class .= ' product-type-advanced effect-bhesfd'; | |||||
| 123 | $_content_pos1 = ' text-left'; | |||||
| 124 | } | |||||
| 125 | if($_box_style == 'box_border') { | |||||
| 126 | $_type_class .= ' product-type-advanced effect-bheborder'; | |||||
| 127 | } | |||||
| 128 | if($_box_style == 'box_border_padding') { | |||||
| 129 | $_type_class .= ' product-type-advanced effect-bhebrspace'; | |||||
| 130 | } | |||||
| 131 | } | |||||
| 132 | } | |||||
| 133 | ?> | |||||
| 134 | <div class="product-item-info type<?php echo $product_type; ?><?= $_content_pos1;?> porto-tb-item type-product has-post-thumbnail product-type-simple" data-container="product-grid"> | |||||
| 135 | <div class="porto-section<?=$_type_class?> p-0"> | |||||
| 136 | <?php if($product_type == '20' && $_box_style == 'box_full'):?><div class="content-shadow"></div><?php endif;?> | |||||
| 66 | <?php // Product Image ?> | 137 | <?php // Product Image ?> | |||
| 67 | <div class="product photo product-item-photo"> | 138 | <div class="product photo product-item-photo<?php if(in_array($product_type, $newType)):?> porto-tb-featured-image tb-image-type-hover<?php endif;?> product-image"> | |||
| 139 | <div class="porto-tb-featured-image tb-image-type-hover"> | |||||
| 68 | <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> | 140 | <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> | |||
| 69 | <?php | 141 | <?php | |||
| 70 | if($aspect_ratio) | 142 | if($aspect_ratio) | |||
| 71 | $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | 143 | $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | |||
| 72 | else | 144 | else | |||
| 73 | $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); | 145 | $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); | |||
| 74 | $productImageUrl = $productImage->getUrl(); | 146 | $productImageUrl = $productImage->getUrl(); | |||
| 75 | ?> | 147 | ?> | |||
| 76 | <img class="product-image-photo default_image" src="<?php echo $productImageUrl; ?>" alt="<?php echo $productImage->getLabel(); ?>"/> | 148 | <img class="product-image-photo default_image" src="<?php echo $productImageUrl; ?>" alt="<?php echo $productImage->getLabel(); ?>"/> | |||
| 77 | <?php if($_category_config['alternative_image']): ?> | 149 | <?php if($_category_config['alternative_image']): ?> | |||
| 78 | <?php | 150 | <?php | |||
| 79 | if($aspect_ratio) | 151 | if($aspect_ratio) | |||
| 80 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | 152 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); | |||
| 81 | else | 153 | else | |||
| 82 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); | 154 | $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); | |||
| 83 | $productHoverImageUrl = $productHoverImage->getUrl(); | 155 | $productHoverImageUrl = $productHoverImage->getUrl(); | |||
| 84 | ?> | 156 | ?> | |||
| 85 | <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> | 157 | <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> | |||
| 86 | <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php echo $productHoverImage->getLabel(); ?>"/> | 158 | <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" alt="<?php echo $productHoverImage->getLabel(); ?>"/> | |||
| 87 | <?php endif; ?> | 159 | <?php endif; ?> | |||
| 88 | <?php endif; ?> | 160 | <?php endif; ?> | |||
| 89 | </a> | 161 | </a> | |||
| 90 | <?php | 162 | <?php | |||
| 91 | $product_label = ""; | 163 | $product_label = ""; | |||
| 92 | if($_product_label_config['sale_label']) { | 164 | if($_product_label_config['sale_label']) { | |||
| 93 | if ($percentage = $_portohelper->getPercentage($_product)) { | 165 | if ($percentage = $_portohelper->getPercentage($_product)) { | |||
| 94 | if($_product_label_config['sale_label_percent']) { | 166 | if($_product_label_config['sale_label_percent']) { | |||
| 95 | $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>'; | 167 | $product_label .= '<div class="product-label sale-label">'.$percentage.'%'.'</div>'; | |||
| 96 | } else { | 168 | } else { | |||
| 97 | $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; | 169 | $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; | |||
| 98 | } | 170 | } | |||
| 99 | } | 171 | } | |||
| 100 | } | 172 | } | |||
| 101 | if($_product_label_config['new_label']) { | 173 | if($_product_label_config['new_label']) { | |||
| 102 | $now = date("Y-m-d"); | 174 | $now = date("Y-m-d"); | |||
| 103 | $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10); | 175 | $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10); | |||
| 104 | $newsTo= substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10); | 176 | $newsTo= substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10); | |||
| 105 | 177 | |||||
| 106 | if ($newsTo != '' || $newsFrom != ''){ | 178 | if ($newsTo != '' || $newsFrom != ''){ | |||
| 107 | if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { | 179 | if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { | |||
| 108 | $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; | 180 | $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; | |||
| 109 | } | 181 | } | |||
| 110 | } | 182 | } | |||
| 111 | } | 183 | } | |||
| 112 | if($product_label) | 184 | if($product_label) | |||
| 113 | echo '<div class="product-labels">'.$product_label.'</div>'; | 185 | echo '<div class="product-labels">'.$product_label.'</div>'; | |||
| 114 | ?> | 186 | ?> | |||
| 115 | <?php if($product_type == 3 || | 187 | <?php | |||
| 116 | <div class="product-item-inner"> | 188 | $_show_actions_top = false; | |||
| 117 | <div class="product actions product-item-actions"> | 189 | $_product_inner_class = ''; | |||
| 190 | if(in_array($product_type, ['3','5','6','7','8','9','11','13','14','15','16','17','18','19','20'])) { | |||||
| 191 | $_show_actions_top = true; | |||||
| 192 | if($product_type == 14 && $_button_pos == 'outside'){ | |||||
| 193 | $_show_actions_top = false; | |||||
| 194 | } | |||||
| 195 | if($product_type >= 13){ | |||||
| 196 | $_product_inner_class = ' tb-hover-content with-link'; | |||||
| 197 | } | |||||
| 198 | ||||||
| 199 | | |||||
| 200 | $_product_inner_class .= ' css-bottom-iconcart icon-absolute'; | |||||
| 201 | } | |||||
| 202 | if($product_type == 14 && $_icon_only1){ | |||||
| 203 | $_product_inner_class .= ' show-cart-icon'; | |||||
| 204 | } | |||||
| 205 | if($product_type == 14 && $_button_pos != 'outside'){ | |||||
| 206 | $_product_inner_class .= ' button-pos-'.$_button_pos; | |||||
| 207 | } | |||||
| 208 | if($product_type == 15 && $_icon_only2 && $_button_action != 'top'){ | |||||
| 209 | $_product_inner_class .= ' show-cart-icon'; | |||||
| 210 | } | |||||
| 211 | if($product_type == 15 && $_button_action != 'top') { | |||||
| 212 | $_product_inner_class .= ' button-pos-center'; | |||||
| 213 | } | |||||
| 214 | if($product_type == 18) { | |||||
| 215 | $_product_inner_class .= ' icon-absolute show-cart-icon'; | |||||
| 216 | } | |||||
| 217 | if($product_type == 20 && $_box_style != 'box_full') { | |||||
| 218 | $_product_inner_class .= ' css-bottom-iconcart icon-absolute'; | |||||
| 219 | } | |||||
| 220 | if($product_type == 20 && $_box_style == 'box_full'){ | |||||
| 221 | $_show_actions_top = false; | |||||
| 222 | } | |||||
| 223 | } | |||||
| 224 | if($_show_actions_top): ?> | |||||
| 225 | <div class="product-item-inner<?= $_product_inner_class;?>"> | |||||
| 226 | <?php if(in_array($product_type, $newType)):?> | |||||
| 227 | <a aria-label="post content" href="<?php echo $_product->getProductUrl() ?>" class="porto-tb-link"></a> | |||||
| 228 | <?php endif;?> | |||||
| 229 | <?php if($product_type == 15 || $product_type == 16 || $product_type == 18):?> | |||||
| 230 | <?php if(($product_type == 15 && $_button_action == 'center') || ($product_type == 18 && $_content_pos2 == 'default') || ($product_type == 18 && $_content_pos2 == 'center')):?> | |||||
| 231 | <div class="porto-section content-top"> | |||||
| 232 | <?php $_productNameStripped = $block->stripTags($_product->getName(), null, true); ?> | |||||
| 233 | <strong class="product name product-item-name"> | |||||
| 234 | <a class="product-item-link" | |||||
| 235 | href="<?php echo $_product->getProductUrl() ?>"> | |||||
| 236 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | |||||
| 237 | </a> | |||||
| 238 | </strong> | |||||
| 239 | <?php if($_category_config['rating_star']): ?> | |||||
| 240 | <?php | |||||
| 241 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | |||||
| 242 | ?> | |||||
| 243 | <?php if($review_html): ?> | |||||
| 244 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | |||||
| 245 | <?php else: ?> | |||||
| 246 | <div class="product-reviews-summary short"> | |||||
| 247 | <div class="rating-summary"> | |||||
| 248 | <span class="label"><span>Rating:</span></span> | |||||
| 249 | <div class="rating-result" title="0%"> | |||||
| 250 | <span style="width:0"><span>0%</span></span> | |||||
| 251 | </div> | |||||
| 252 | </div> | |||||
| 253 | </div> | |||||
| 254 | <?php endif; ?> | |||||
| 255 | <?php endif; ?> | |||||
| 256 | </div> | |||||
| 257 | <?php endif; ?> | |||||
| 258 | <div class="product details product-item-details porto-section<?php if($_button_action == 'top' || $_button_action == 'hide' || $product_type == 16):?> product-content<?php endif;?><?php if($product_type == 15 && $_button_action == 'center'):?> content-bottom<?php endif;?><?php if($product_type == 16 && $_block_pos == 'full'):?> d-flex justify-content-center flex-column<?php endif;?>"> | |||||
| 259 | <?php if($_button_action == 'top' || $_button_action == 'hide' || $product_type == 16 || ($product_type == 18 && $_content_pos2 == 'top') || ($product_type == 18 && $_content_pos2 == 'bottom')):?> | |||||
| 260 | <?php $_productNameStripped = $block->stripTags($_product->getName(), null, true); ?> | |||||
| 261 | <strong class="product name product-item-name"> | |||||
| 262 | <a class="product-item-link" | |||||
| 263 | href="<?php echo $_product->getProductUrl() ?>"> | |||||
| 264 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | |||||
| 265 | </a> | |||||
| 266 | </strong> | |||||
| 267 | <?php if($_category_config['rating_star']): ?> | |||||
| 268 | <?php | |||||
| 269 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | |||||
| 270 | ?> | |||||
| 271 | <?php if($review_html): ?> | |||||
| 272 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | |||||
| 273 | <?php else: ?> | |||||
| 274 | <div class="product-reviews-summary short"> | |||||
| 275 | <div class="rating-summary"> | |||||
| 276 | <span class="label"><span>Rating:</span></span> | |||||
| 277 | <div class="rating-result" title="0%"> | |||||
| 278 | <span style="width:0"><span>0%</span></span> | |||||
| 279 | </div> | |||||
| 280 | </div> | |||||
| 281 | </div> | |||||
| 282 | <?php endif; ?> | |||||
| 283 | <?php endif; ?> | |||||
| 284 | <?php endif;?> | |||||
| 285 | ||||||
| 286 | <?php if($_category_config['product_price']): ?> | |||||
| 287 | <?php echo $block->getProductPrice($_product) ?> | |||||
| 288 | <?php endif; ?> | |||||
| 289 | <?php echo $block->getProductDetailsHtml($_product); ?> | |||||
| 290 | <?php if($product_type == 16):?> | |||||
| 118 | <div class="actions-primary"> | 291 | <div class="actions-primary"> | |||
| 119 | <?php if ($_product->isSaleable()): ?> | 292 | <?php if ($_product->isSaleable()): ?> | |||
| 120 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | 293 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | |||
| 121 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> | 294 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> | |||
| 122 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | 295 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | |||
| 123 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | 296 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | |||
| 124 | ||||||
| 125 | <?php echo $block->getBlockHtml('formkey')?> | 297 | <?php echo $block->getBlockHtml('formkey')?> | |||
| 126 | <button type="submit" | 298 | <button type="submit" | |||
| 127 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | 299 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | |||
| 128 | class="action tocart primary"> | 300 | class="action tocart primary"> | |||
| 129 | <span><?php echo __('Add to Cart') ?></span> | 301 | <span><?php echo __('Add to Cart') ?></span> | |||
| 130 | </button> | 302 | </button> | |||
| 131 | </form> | 303 | </form> | |||
| 132 | <?php else: ?> | 304 | <?php else: ?> | |||
| 133 | <?php if ($_product->getIsSalable()): ?> | 305 | <?php if ($_product->getIsSalable()): ?> | |||
| 134 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | 306 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | |||
| 135 | <?php else: ?> | 307 | <?php else: ?> | |||
| 136 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | 308 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | |||
| 137 | <?php endif; ?> | 309 | <?php endif; ?> | |||
| 138 | <?php endif; ?> | 310 | <?php endif; ?> | |||
| 139 | </div> | 311 | </div> | |||
| 312 | <?php endif;?> | |||||
| 313 | </div> | |||||
| 314 | <?php endif; ?> | |||||
| 315 | <div class="product actions product-item-actions<?php if($product_type == 14 || ($product_type == 15 && $_button_action != 'top') || $product_type == 16 || $product_type == 17):?> d-flex align-items-center justify-content-center<?php endif;?><?php if($product_type == 17 && $_quantity_pos == 'image_center'):?> actions-center<?php endif;?>"> | |||||
| 316 | <?php | |||||
| 317 | $c_show_cart = false; | |||||
| 318 | if($product_type != 16){ | |||||
| 319 | $c_show_cart = true; | |||||
| 320 | } | |||||
| 321 | if($product_type == 17 && ($_quantity_pos =='below' || $_quantity_pos =='above')) { | |||||
| 322 | $c_show_cart = false; | |||||
| 323 | } | |||||
| 324 | if($product_type == 19 && $_link_pos != 'image') { | |||||
| 325 | $c_show_cart = false; | |||||
| 326 | } | |||||
| 327 | ?> | |||||
| 328 | <?php if($c_show_cart):?> | |||||
| 329 | <div class="actions-primary"> | |||||
| 330 | <?php if ($_product->isSaleable()): ?> | |||||
| 331 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | |||||
| 332 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post" class="d-flex flex-column flex-sm-row"> | |||||
| 333 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | |||||
| 334 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | |||||
| 335 | <?php if($product_type == 17 && ($_quantity_pos == 'image_bottom' || $_quantity_pos == 'image_center')):?> | |||||
| 336 | <div class="qty-box"> | |||||
| 337 | <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> | |||||
| 338 | <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> | |||||
| 339 | <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> | |||||
| 340 | </div> | |||||
| 341 | <?php endif;?> | |||||
| 342 | <?php echo $block->getBlockHtml('formkey')?> | |||||
| 343 | <button type="submit" | |||||
| 344 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | |||||
| 345 | class="action tocart primary"> | |||||
| 346 | <span><?php echo __('Add to Cart') ?></span> | |||||
| 347 | </button> | |||||
| 348 | </form> | |||||
| 349 | <?php else: ?> | |||||
| 350 | <?php if ($_product->getIsSalable()): ?> | |||||
| 351 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | |||||
| 352 | <?php else: ?> | |||||
| 353 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | |||||
| 354 | <?php endif; ?> | |||||
| 355 | <?php endif; ?> | |||||
| 356 | </div> | |||||
| 357 | <?php endif;?> | |||||
| 140 | <?php if ($block->getMode() == 'grid'): ?> | 358 | <?php if ($block->getMode() == 'grid'): ?> | |||
| 141 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | 359 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 142 | <a href="#" | 360 | <a href="#" | |||
| 143 | class="action towishlist actions-secondary" | 361 | class="action towishlist actions-secondary" | |||
| 144 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 362 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 145 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 363 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 146 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | 364 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||
| 147 | data-action="add-to-wishlist" | 365 | data-action="add-to-wishlist" | |||
| 148 | role="button"> | 366 | role="button"> | |||
| 149 | <span><?php echo __('Add to Wish List') ?></span> | 367 | <span><?php echo __('Add to Wish List') ?></span> | |||
| 150 | </a> | 368 | </a> | |||
| 151 | <?php endif; ?> | 369 | <?php endif; ?> | |||
| 152 | <?php endif; ?> | 370 | <?php endif; ?> | |||
| 153 | <?php if($_category_config['addtocompare']): ?> | 371 | <?php if($_category_config['addtocompare']): ?> | |||
| 154 | <?php | 372 | <?php | |||
| 155 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | 373 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | |||
| 156 | ?> | 374 | ?> | |||
| 157 | <a href="#" | 375 | <a href="#" | |||
| 158 | class="action tocompare actions-secondary" | 376 | class="action tocompare actions-secondary" | |||
| 159 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | 377 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||
| 160 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | 378 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||
| 161 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | 379 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | |||
| 162 | role="button"> | 380 | role="button"> | |||
| 163 | <span><?php echo __('Add to Compare') ?></span> | 381 | <span><?php echo __('Add to Compare') ?></span> | |||
| 164 | </a> | 382 | </a> | |||
| 165 | <?php endif; ?> | 383 | <?php endif; ?> | |||
| 166 | </div> | 384 | </div> | |||
| 167 | </div> | 385 | </div> | |||
| 168 | <?php endif; ?> | 386 | <?php endif; ?> | |||
| 169 | </div> | 387 | </div> | |||
| 170 | <div class="product details product-item-details"> | 388 | </div> | |||
| 389 | <?php if($product_type != '15' && $product_type != 16 && $product_type != '18'): ?> | |||||
| 390 | <div class="product details product-item-details porto-section product-content<?php if($product_type == '17' && $_quantity_pos =='above'):?> qty-above d-flex flex-column align-items-center<?php endif;?><?php if($product_type == '19' && ($_link_pos == 'top' || $_link_pos == 'hidden')){?> show-cartlink-top<?php }?>"> | |||||
| 171 | <?php | 391 | <?php | |||
| 172 | $_productNameStripped = $block->stripTags($_product->getName(), null, true); | 392 | $_productNameStripped = $block->stripTags($_product->getName(), null, true); | |||
| 173 | ?> | 393 | ?> | |||
| 394 | <?php if($product_type == '13' || $product_type == '14' || $product_type == '19' || $product_type == '20'): ?> | |||||
| 395 | <?php echo $block->getProductDetailsHtml($_product); ?> | |||||
| 396 | <?php endif;?> | |||||
| 174 | <strong class="product name product-item-name"> | 397 | <strong class="product name product-item-name"> | |||
| 175 | <a class="product-item-link" | 398 | <a class="product-item-link" | |||
| 176 | href="<?php echo $_product->getProductUrl() ?>"> | 399 | href="<?php echo $_product->getProductUrl() ?>"> | |||
| 177 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | 400 | <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> | |||
| 178 | </a> | 401 | </a> | |||
| 179 | </strong> | 402 | </strong> | |||
| 180 | <?php //$_category_config['rating_star'] = ""; //disabled at the moment ?> | 403 | <?php //$_category_config['rating_star'] = ""; //disabled at the moment ?> | |||
| 181 | <?php if($_category_config['rating_star']): ?> | 404 | <?php if($_category_config['rating_star']): ?> | |||
| 182 | <?php | 405 | <?php | |||
| 183 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | 406 | $review_html = $block->getReviewsSummaryHtml($_product, $templateType); | |||
| 184 | ?> | 407 | ?> | |||
| 185 | <?php if($review_html): ?> | 408 | <?php if($review_html): ?> | |||
| 186 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | 409 | <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> | |||
| 187 | <?php else: ?> | 410 | <?php else: ?> | |||
| 188 | <div class="product-reviews-summary short"> | 411 | <div class="product-reviews-summary short"> | |||
| 189 | <div class="rating-summary"> | 412 | <div class="rating-summary"> | |||
| 190 | <span class="label"><span>Rating:</span></span> | 413 | <span class="label"><span>Rating:</span></span> | |||
| 191 | <div class="rating-result" title="0%"> | 414 | <div class="rating-result" title="0%"> | |||
| 192 | <span style="width:0"><span>0%</span></span> | 415 | <span style="width:0"><span>0%</span></span> | |||
| 193 | </div> | 416 | </div> | |||
| 194 | </div> | 417 | </div> | |||
| 195 | </div> | 418 | </div> | |||
| 196 | <?php endif; ?> | 419 | <?php endif; ?> | |||
| 197 | <?php endif; ?> | 420 | <?php endif; ?> | |||
| 198 | <?php if ($showDescription):?> | 421 | <?php if ($showDescription):?> | |||
| 199 | <div class="product description product-item-description"> | 422 | <div class="product description product-item-description"> | |||
| 200 | <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> | 423 | <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> | |||
| 201 | <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" | 424 | <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" | |||
| 202 | class="action more"><?php echo __('Learn More') ?></a> | 425 | class="action more"><?php echo __('Learn More') ?></a> | |||
| 203 | </div> | 426 | </div> | |||
| 204 | <?php endif; ?> | 427 | <?php endif; ?> | |||
| 205 | <?php if($_category_config['product_price']): ?> | 428 | <?php if($_category_config['product_price']): ?> | |||
| 206 | <?php echo $block->getProductPrice($_product) ?> | 429 | <?php echo $block->getProductPrice($_product) ?> | |||
| 207 | <?php endif; ?> | 430 | <?php endif; ?> | |||
| 431 | <?php if($product_type != '13' && $product_type != '14' && $product_type != '19' && $product_type != '20'): ?> | |||||
| 208 | <?php echo $block->getProductDetailsHtml($_product); ?> | 432 | <?php echo $block->getProductDetailsHtml($_product); ?> | |||
| 433 | <?php endif; ?> | |||||
| 209 | 434 | |||||
| 210 | <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?> | 435 | <?php | |||
| 211 | <div class="product-item-inner | 436 | $_product_show_actions = true; | |||
| 212 | <div class="product actions product-item-actions"> | 437 | $_product_details_inner_class = ''; | |||
| 438 | if(in_array($product_type, ['3','5','6','7','8','9','11','13','14','17','19','20'])) { | |||||
| 439 | $_product_show_actions = false; | |||||
| 440 | if($product_type == '14' && $_button_pos =='outside'){ | |||||
| 441 | $_product_show_actions = true; | |||||
| 442 | $_product_details_inner_class .= ' button-pos'.$_button_pos; | |||||
| 443 | } | |||||
| 444 | if($product_type == '14' && $_icon_only1 ) { | |||||
| 445 | $_product_details_inner_class .= ' show-cart-icon'; | |||||
| 446 | } | |||||
| 447 | if($product_type == '17' && ($_quantity_pos =='below' || $_quantity_pos =='above')){ | |||||
| 448 | $_product_show_actions = true; | |||||
| 449 | } | |||||
| 450 | if($product_type == '19' && ($_link_pos == 'default' || $_link_pos == 'top')){ | |||||
| 451 | $_product_show_actions = true; | |||||
| 452 | } | |||||
| 453 | if($product_type == '20' && $_box_style == 'box_full'){ | |||||
| 454 | $_product_show_actions = true; | |||||
| 455 | } | |||||
| 456 | } | |||||
| 457 | if($_product_show_actions): ?> | |||||
| 458 | <div class="product-item-inner<?=$_product_details_inner_class;?>"> | |||||
| 459 | <?php if($product_type == '20' && $_box_style == 'box_full'){?> | |||||
| 460 | <div class="product description product-item-description"> | |||||
| 461 | <?php | |||||
| 462 | $length = 118; | |||||
| 463 | $shortContent = $_product->getShortDescription(); | |||||
| 464 | echo $shortContent = strip_tags((strlen($shortContent) > $length) ? substr($shortContent,0,$length).'...' : $shortContent); | |||||
| 465 | ?> | |||||
| 466 | </div> | |||||
| 467 | <?php }?> | |||||
| 468 | <div class="product actions product-item-actions<?php if(($product_type == '14' && $_button_pos == 'outside') || ($product_type == '20' && $_box_style == 'box_full')):?> d-flex align-items-center justify-content-center<?php endif;?>"> | |||||
| 213 | <?php if ($block->getMode() == 'grid'): ?> | 469 | <?php if ($block->getMode() == 'grid'): ?> | |||
| 214 | <?php if($_category_config['addtowishlist'] && $product_type != | 470 | <?php if($_category_config['addtowishlist'] && $product_type != '4' && $product_type != '17' && $product_type != '19'): ?> | |||
| 215 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | 471 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 216 | <a href="#" | 472 | <a href="#" | |||
| 217 | class="action towishlist actions-secondary" | 473 | class="action towishlist actions-secondary" | |||
| 218 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 474 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 219 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 475 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 220 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | 476 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||
| 221 | data-action="add-to-wishlist" | 477 | data-action="add-to-wishlist" | |||
| 222 | role="button"> | 478 | role="button"> | |||
| 223 | <span><?php echo __('Add to Wish List') ?></span> | 479 | <span><?php echo __('Add to Wish List') ?></span> | |||
| 224 | </a> | 480 | </a> | |||
| 225 | <?php endif; ?> | 481 | <?php endif; ?> | |||
| 226 | <?php endif; ?> | 482 | <?php endif; ?> | |||
| 227 | <?php endif; ?> | 483 | <?php endif; ?> | |||
| 228 | <div class="actions-primary"> | 484 | <div class="actions-primary"> | |||
| 229 | <?php if ($_product->isSaleable()): ?> | 485 | <?php if ($_product->isSaleable()): ?> | |||
| 230 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | 486 | <?php $postParams = $block->getAddToCartPostParams($_product); ?> | |||
| 231 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post" | 487 | <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post" class="d-flex flex-column flex-sm-row"> | |||
| 232 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | 488 | <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> | |||
| 233 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | 489 | <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> | |||
| 234 | <?php if($product_type == 10 | 490 | <?php if($product_type == 10 || $product_type == 17):?> | |||
| 235 | <div class="qty-box"> | 491 | <div class="qty-box"> | |||
| 236 | <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> | 492 | <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> | |||
| 237 | <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> | 493 | <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> | |||
| 238 | <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> | 494 | <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> | |||
| 239 | </div> | 495 | </div> | |||
| 240 | <?php endif;?> | 496 | <?php endif;?> | |||
| 241 | <?php echo $block->getBlockHtml('formkey')?> | 497 | <?php echo $block->getBlockHtml('formkey')?> | |||
| 242 | <button type="submit" | 498 | <button type="submit" | |||
| 243 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | 499 | title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" | |||
| 244 | class="action tocart primary"> | 500 | class="action tocart primary"> | |||
| 245 | <span><?php echo __('Add to Cart') ?></span> | 501 | <span><?php echo __('Add to Cart') ?></span> | |||
| 246 | </button> | 502 | </button> | |||
| 247 | </form> | 503 | </form> | |||
| 248 | <?php else: ?> | 504 | <?php else: ?> | |||
| 249 | <?php if ($_product->getIsSalable()): ?> | 505 | <?php if ($_product->getIsSalable()): ?> | |||
| 250 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | 506 | <div class="stock available"><span><?php echo __('In stock') ?></span></div> | |||
| 251 | <?php else: ?> | 507 | <?php else: ?> | |||
| 252 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | 508 | <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> | |||
| 253 | <?php endif; ?> | 509 | <?php endif; ?> | |||
| 254 | <?php endif; ?> | 510 | <?php endif; ?> | |||
| 255 | </div> | 511 | </div> | |||
| 256 | <?php if ($block->getMode() == 'grid' | 512 | <?php if ($block->getMode() == 'grid' && $product_type != '17' && $product_type != '19'): ?> | |||
| 257 | <?php if($_category_config['addtowishlist'] && $product_type == 4): ?> | 513 | <?php if($_category_config['addtowishlist'] && $product_type == 4): ?> | |||
| 258 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | 514 | <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> | |||
| 259 | <a href="#" | 515 | <a href="#" | |||
| 260 | class="action towishlist actions-secondary" | 516 | class="action towishlist actions-secondary" | |||
| 261 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 517 | title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 262 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | 518 | aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" | |||
| 263 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | 519 | data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' | |||
| 264 | data-action="add-to-wishlist" | 520 | data-action="add-to-wishlist" | |||
| 265 | role="button"> | 521 | role="button"> | |||
| 266 | <span><?php echo __('Add to Wish List') ?></span> | 522 | <span><?php echo __('Add to Wish List') ?></span> | |||
| 267 | </a> | 523 | </a> | |||
| 268 | <?php endif; ?> | 524 | <?php endif; ?> | |||
| 269 | <?php endif; ?> | 525 | <?php endif; ?> | |||
| 270 | <?php endif; ?> | 526 | <?php endif; ?> | |||
| 271 | <?php if($_category_config['addtocompare'] | 527 | <?php if($_category_config['addtocompare'] && $product_type != '17' && $product_type != '19'): ?> | |||
| 272 | <?php | 528 | <?php | |||
| 273 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | 529 | $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); | |||
| 274 | ?> | 530 | ?> | |||
| 275 | <a href="#" | 531 | <a href="#" | |||
| 276 | class="action tocompare actions-secondary" | 532 | class="action tocompare actions-secondary" | |||
| 277 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | 533 | title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||
| 278 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | 534 | aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" | |||
| 279 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | 535 | data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' | |||
| 280 | role="button"> | 536 | role="button"> | |||
| 281 | <span><?php echo __('Add to Compare') ?></span> | 537 | <span><?php echo __('Add to Compare') ?></span> | |||
| 282 | </a> | 538 | </a> | |||
| 283 | <?php endif; ?> | 539 | <?php endif; ?> | |||
| 284 | </div> | 540 | </div> | |||
| 285 | </div> | 541 | </div> | |||
| 286 | <?php endif; ?> | 542 | <?php endif; ?> | |||
| 287 | </div> | 543 | </div> | |||
| 544 | <?php endif;?> | |||||
| 545 | </div> | |||||
| 288 | </div> | 546 | </div> | |||
| 289 | <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?> | 547 | <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?> | |||
| 290 | <?php endforeach; ?> | 548 | <?php endforeach; ?> | |||
| 291 | </ol> | 549 | </ol> | |||
| 292 | <div style="clear:both;"></div> | 550 | <div style="clear:both;"></div> | |||
| 293 | <?php if($product_count == count($_productCollection)): ?> | 551 | <?php if($product_count == count($_productCollection)): ?> | |||
| 294 | <div class="load-more-area"> | 552 | <div class="load-more-area"> | |||
| 295 | <p class="ajax-loader-area" style="margin: 40px 0;display: none;"><i class="ajax-loader large animate-spin"></i></p> | 553 | <p class="ajax-loader-area" style="margin: 40px 0;display: none;"><i class="ajax-loader large animate-spin"></i></p> | |||
| 296 | <a href="javascript:void(0)" cat_id="<?php echo $category_id; ?>" product_count="<?php echo $product_count + $column_count; ?>"><?php echo __("Load More"); ?></a> | 554 | <a href="javascript:void(0)" cat_id="<?php echo $category_id; ?>" product_count="<?php echo $product_count + $column_count; ?>"><?php echo __("Load More"); ?></a> | |||
| 297 | </div> | 555 | </div> | |||
| 298 | <?php endif; ?> | 556 | <?php endif; ?> | |||
| 299 | </div> | 557 | </div> | |||
| 300 | <script type="text/javascript"> | 558 | <script type="text/javascript"> | |||
| 301 | require([ | 559 | require([ | |||
| 302 | 'jquery', 'weltpixel_quickview' | 560 | 'jquery', 'weltpixel_quickview' | |||
| 303 | ], function ($, quickview) { | 561 | ], function ($, quickview) { | |||
| 562 | <?php if($product_type == '20'){?> | |||||
| 563 | window.setTimeout(function(){ | |||||
| 564 | $( '.product-item-info .effect-bhesfd' ).each( function() { | |||||
| 565 | var $item = $( this ), | |||||
| 566 | $detail = $item.find( '.product-item-details .product-item-inner' ), | |||||
| 567 | height = $item.height() + $detail.height() + 32; | |||||
| 568 | $item.find( '>.content-shadow' ).height( height ); | |||||
| 569 | $( window ).on( 'resize', function() { | |||||
| 570 | $detail = $item.find( '.product-item-details .product-item-inner' ); | |||||
| 571 | height = $item.height() + $detail.height() + 32; | |||||
| 572 | $item.find('>.content-shadow').height( height ); | |||||
| 573 | } ); | |||||
| 574 | }); | |||||
| 575 | },500); | |||||
| 576 | <?php }?> | |||||
| 304 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n)').addClass('nth-child-2n'); | 577 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n)').addClass('nth-child-2n'); | |||
| 305 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); | 578 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); | |||
| 306 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n)').addClass('nth-child-3n'); | 579 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n)').addClass('nth-child-3n'); | |||
| 307 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); | 580 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); | |||
| 308 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n)').addClass('nth-child-4n'); | 581 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n)').addClass('nth-child-4n'); | |||
| 309 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); | 582 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); | |||
| 310 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n)').addClass('nth-child-5n'); | 583 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n)').addClass('nth-child-5n'); | |||
| 311 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); | 584 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); | |||
| 312 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n)').addClass('nth-child-6n'); | 585 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n)').addClass('nth-child-6n'); | |||
| 313 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); | 586 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); | |||
| 314 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n)').addClass('nth-child-7n'); | 587 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n)').addClass('nth-child-7n'); | |||
| 315 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); | 588 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); | |||
| 316 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n)').addClass('nth-child-8n'); | 589 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n)').addClass('nth-child-8n'); | |||
| 317 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); | 590 | $('.main .products.grid .product-items.filterproducts li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); | |||
| 318 | $('.weltpixel-quickview').off('click').on('click', function() { | 591 | $('.weltpixel-quickview').off('click').on('click', function() { | |||
| 319 | var prodUrl = $(this).attr('data-quickview-url'); | 592 | var prodUrl = $(this).attr('data-quickview-url'); | |||
| 320 | if (prodUrl.length) { | 593 | if (prodUrl.length) { | |||
| 321 | quickview.displayContent(prodUrl); | 594 | quickview.displayContent(prodUrl); | |||
| 322 | } | 595 | } | |||
| 323 | }); | 596 | }); | |||
| 324 | $(".ajax-products .products-grid .weltpixel-quickview").each(function(){ | 597 | $(".ajax-products .products-grid .weltpixel-quickview").each(function(){ | |||
| 325 | $(this).appendTo($(this).parent().parent().children(".product-item-photo")); | 598 | $(this).appendTo($(this).parent().parent().children(".product-item-photo")); | |||
| 326 | }); | 599 | }); | |||
| 327 | $('.load-more-area > a').off("click").on("click", function(){ | 600 | $('.load-more-area > a').off("click").on("click", function(){ | |||
| 328 | url = "<?php echo $_portohelper->getBaseLinkUrl()."swporto/index/showcategoryproducts" ?>"; | 601 | url = "<?php echo $_portohelper->getBaseLinkUrl()."swporto/index/showcategoryproducts" ?>"; | |||
| 329 | cat_id = $(this).attr("cat_id"); | 602 | cat_id = $(this).attr("cat_id"); | |||
| 330 | 603 | |||||
| 331 | $(".ajax-products .load-more-area > .ajax-loader-area").fadeIn(); | 604 | $(".ajax-products .load-more-area > .ajax-loader-area").fadeIn(); | |||
| 332 | 605 | |||||
| 333 | $.ajax({ | 606 | $.ajax({ | |||
| 334 | method:"POST", | 607 | method:"POST", | |||
| 335 | url:url, | 608 | url:url, | |||
| 336 | data:{ | 609 | data:{ | |||
| 337 | aspect_ratio:"<?php echo $aspect_ratio; ?>", | 610 | aspect_ratio:"<?php echo $aspect_ratio; ?>", | |||
| 338 | image_width:"<?php echo $image_width; ?>", | 611 | image_width:"<?php echo $image_width; ?>", | |||
| 339 | image_height:"<?php echo $image_height; ?>", | 612 | image_height:"<?php echo $image_height; ?>", | |||
| 340 | product_count:"<?php echo $product_count+$column_count; ?>", | 613 | product_count:"<?php echo $product_count+$column_count; ?>", | |||
| 341 | columns:"<?php echo $column_count; ?>", | 614 | columns:"<?php echo $column_count; ?>", | |||
| 342 | category_id:cat_id | 615 | category_id:cat_id | |||
| 343 | }, | 616 | }, | |||
| 344 | dataType: 'json' | 617 | dataType: 'json' | |||
| 345 | }).done(function(data){ | 618 | }).done(function(data){ | |||
| 346 | $(".ajax-products > .category-detail > .products-area").html(data.result); | 619 | $(".ajax-products > .category-detail > .products-area").html(data.result); | |||
| 347 | if($("form[data-role=tocart-form]").length > 0 && !redirect_cart) { | 620 | if($("form[data-role=tocart-form]").length > 0 && !redirect_cart) { | |||
| 348 | $("form[data-role=tocart-form]").catalogAddToCart(); | 621 | $("form[data-role=tocart-form]").catalogAddToCart(); | |||
| 349 | } | 622 | } | |||
| 350 | }).fail(function(){ | 623 | }).fail(function(){ | |||
| 351 | 624 | |||||
| 352 | }).always(function(){ | 625 | }).always(function(){ | |||
| 353 | $(".ajax-products > .category-detail > .ajax_products_loader").fadeOut(); | 626 | $(".ajax-products > .category-detail > .ajax_products_loader").fadeOut(); | |||
| 354 | if(typeof enable_quickview != 'undefined' && enable_quickview == true) { | 627 | if(typeof enable_quickview != 'undefined' && enable_quickview == true) { | |||
| 355 | requirejs(['jquery', 'weltpixel_quickview' ], | 628 | requirejs(['jquery', 'weltpixel_quickview' ], | |||
| 356 | function ($, quickview) { | 629 | function ($, quickview) { | |||
| 357 | $('.weltpixel-quickview').off('click').on('click', function() { | 630 | $('.weltpixel-quickview').off('click').on('click', function() { | |||
| 358 | var prodUrl = $(this).attr('data-quickview-url'); | 631 | var prodUrl = $(this).attr('data-quickview-url'); | |||
| 359 | if (prodUrl.length) { | 632 | if (prodUrl.length) { | |||
| 360 | quickview.displayContent(prodUrl); | 633 | quickview.displayContent(prodUrl); | |||
| 361 | } | 634 | } | |||
| 362 | }); | 635 | }); | |||
| 363 | $(".ajax-products .products-grid .weltpixel-quickview").each(function(){ | 636 | $(".ajax-products .products-grid .weltpixel-quickview").each(function(){ | |||
| 637 | $(this).parent().parent().addClass('has-quickview'); | |||||
| 638 | if($(this).parents('.product-type-advanced').find(".product-item-photo.porto-tb-featured-image .icon-absolute").length > 0){ | |||||
| 639 | $(this).appendTo($(this).parents('.product-type-advanced').find(".product-item-photo .porto-tb-featured-image .product-item-inner .product-item-actions")); | |||||
| 640 | }else{ | |||||
| 364 | $(this).appendTo($(this).parent().parent().children(".product-item-photo")); | 641 | $(this).appendTo($(this).parent().parent().children(".product-item-photo")); | |||
| 642 | } | |||||
| 365 | }); | 643 | }); | |||
| 366 | }); | 644 | }); | |||
| 367 | } | 645 | } | |||
| 368 | }); | 646 | }); | |||
| 369 | }); | 647 | }); | |||
| 370 | }); | 648 | }); | |||
| 371 | </script> | 649 | </script> | |||
| 372 | <?php if (!$block->isRedirectToCartEnabled()) : ?> | 650 | <?php if (!$block->isRedirectToCartEnabled()) : ?> | |||
| 373 | <script type="text/x-magento-init"> | 651 | <script type="text/x-magento-init"> | |||
| 374 | { | 652 | { | |||
| 375 | "[data-role=tocart-form], .form.map.checkout": { | 653 | "[data-role=tocart-form], .form.map.checkout": { | |||
| 376 | "catalogAddToCart": {} | 654 | "catalogAddToCart": {} | |||
| 377 | } | 655 | } | |||
| 378 | } | 656 | } | |||
| 379 | </script> | 657 | </script> | |||
| 380 | <?php endif; ?> | 658 | <?php endif; ?> | |||
| 381 | <?php endif; ?> | 659 | <?php endif; ?> |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.